package com.tamo.ppresta.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.gyf.immersionbar.ImmersionBar;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tamo.ppresta.R;
import com.tamo.ppresta.base.BaseActivity;
import com.tamo.ppresta.util.ButtonUtils;
import com.tamo.ppresta.util.MyUtils;
import com.tamo.ppresta.util.ToastUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author yeyang
 * @name ppresta
 * @class name：com.tamo.ppresta.activity
 * @class describe
 * @time 2022/12/21 21:09
 * @change
 * @chang time
 * @class describe
 */
public class LoanDocumentationActivity extends BaseActivity {
    @BindView(R.id.recyclerView)
    RecyclerView mRecyclerView;
    @BindView(R.id.refresh_footer)
    ClassicsFooter mRefreshFooter;
    @BindView(R.id.refresh_header)
    ClassicsHeader mRefreshHeader;
    @BindView(R.id.refreshLayout)
    SmartRefreshLayout mRefreshLayout;
    @BindView(R.id.iv_no_data_pic)
    ImageView mIvNoDataPic;
    @BindView(R.id.tv_no_data_text)
    TextView mTvNoDataText;
    @BindView(R.id.tv_prestar)
    TextView mTvPrestar;
    @BindView(R.id.rl_no_data)
    RelativeLayout mRlNoData;
    @BindView(R.id.iv_title_back)
    ImageView mIvTitleBack;
    @BindView(R.id.rl_title_back)
    RelativeLayout mRlTitleBack;
    @BindView(R.id.tv_title_name)
    TextView mTvTitleName;

    @Override
    protected int setLayout() {
        return R.layout.activity_loan_documentation;
    }

    @Override
    protected void setView() {
        mTvTitleName.setText(R.string.daikuanjilu);
        mRlTitleBack.setOnClickListener(this::onClick);
        mTvPrestar.setOnClickListener(this::onClick);
    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {
        ButtonUtils.isFastDoubleClick();
        switch (v.getId()) {
            case R.id.rl_title_back:
                finish();
                break;
            case R.id.tv_prestar:
                ToastUtil.showShort(this, "没有贷款，去贷款");
                break;
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        MyUtils.setStatusBarVisible(this);
        ImmersionBar.with(this)
                .statusBarColor(R.color.white)
                .transparentNavigationBar()  //透明导航栏，不写默认黑色(设置此方法，fullScreen()方法自动为true)
                .statusBarDarkFont(true)
                .init();
        ButterKnife.bind(this);
    }
}